package saiboten;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;


public class SAXTemperatureHandler extends DefaultHandler {
	String firstResult = "";
	
	@Override
	public void startElement(String uri, String localName, String name,
			Attributes attributes) throws SAXException {
		super.startElement(uri, localName, name, attributes);
		if(name.equals("temperature")) {
			if(firstResult.equals("")) {
				firstResult = attributes.getValue("value");
			}
			
		}
	}
	
	public String getResult() {
		return firstResult;
	}
}